home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 6_17.lha / 6_17 / 6_17a4.c < prev    next >
Text File  |  1993-08-08  |  302b  |  18 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / x = y
  6. ector& vector::operator=(vector &vec)
  7.  
  8.    vec.p->refcnt++;
  9.    if (--p->refcnt == 0)
  10.        {
  11. delete p->f;
  12. delete p;
  13. }
  14.  
  15.    p = vec.p;
  16.    return *this;
  17.  
  18.